package com.qf.mp2302.controller;

import com.qf.mp2302.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/product")
public class ProductController {

    @Autowired
    ProductService productService;

    @GetMapping("/cut")
    public String cutprice(Long id,Integer deltaprice){
        boolean flag = productService.modprice(id, deltaprice);
        return flag+"";
    }

}
